#ifndef ANIMATEDSPRITE_HPP
#define ANIMATEDSPRITE_HPP

#include <vector>
#include <string>

#include <SFML/System.hpp>
namespace sf
{
    class Sprite;
}

class SpriteManager;

class AnimatedSprite
{
    private:
        std::vector<std::string> m_spriteList;

        //!Timer de l'animation
        sf::Clock m_time;

        float m_interval;
        float m_lastUpdate;
        unsigned int m_actualFrame;

    public:
        AnimatedSprite();
        ~AnimatedSprite();

        void addSprite(const std::string& spriteName);

        const sf::Sprite& getSprite(const SpriteManager& m_spriteManager, int angle, int level);

        void setInterval(float newInterval) { m_interval = newInterval; }

        void update();
};

#endif
